var express = require('express');
var router = express.Router();
var Category = require('../models/category');

// GET /categories 分类列表
router.get('/', function(req, res, next) {
    Category.getCategories(function (err, categories) {
        if (err) return next(err);
        res.json(categories);
    });
});

// POST categories/add 新增分类
router.post('/add', function(req, res, next) {
});

module.exports = router;